<!DOCTYPE HTML>
<meta charset="UTF-8">
<title>No Name</title>
<script src="global/config.js"></script>
<script src="global/event.js"></script>
<script src="global/function.js"></script>
<script>
window.onload=function(){
    var mode=document.createElement('script'); 
    mode.src = "mode/"+config.mode+".js";
    document.head.appendChild(mode);
    
    for(var i in config[config.mode].cards){
        var card=document.createElement('script'); 
        card.src = "card/"+config[config.mode].cards[i]+".js";
        document.head.appendChild(card);
    }
    
    for(var i in config[config.mode].characters){
        var character=document.createElement('script'); 
        character.src = "character/"+config[config.mode].characters[i]+".js";
        document.head.appendChild(character);
    }

    var layout=document.createElement("link");
    layout.rel="stylesheet";
    layout.href="theme/layout/"+config.layout+".css";
    document.head.appendChild(layout);

    var skin=document.createElement("link");
    skin.rel="stylesheet";
    skin.href="theme/skin/"+config.skin+".css";
    document.head.appendChild(skin);

    if(config.background[0]!=undefined){
        if(config.background[1]=='stretch')
            document.body.style.backgroundSize='100%';
        document.body.style.backgroundImage="url('theme/background/"+config.background[0]+".jpg')"
    }

    document.body.setAttribute('onresize','if(ui.dialog.current)ui.updateStyle()')
    setTimeout('PrepareTable()', 100)
}
</script>